//
//  YCStatement.m
//  YCDB
//
//  Created by 唐可雄 on 2017/8/25.
//  Copyright © 2017年 swustyc. All rights reserved.
//

#import "YCStatement.h"

#import <sqlite3.h>

@implementation YCStatement

- (void)close {
    if (_statement) {
        sqlite3_finalize(_statement);
        _statement = 0x00;
    }
    
    self.inUse = NO;
}

- (void)reset {
    if (_statement) {
        sqlite3_reset(_statement);
    }
    
    self.inUse = NO;
}

- (NSString *)debugDescription {
    return [NSString stringWithFormat:@"%@ %ld hit(s) for query %@", [super debugDescription], _useCount, _query];
}

@end
